'use strict';

/* Controllers */
// signin controller
app.controller('HomeController', ['$rootScope', '$scope', '$state', '$cookieStore','AccountService', 'BaseInfoService',function ($rootScope, $scope, $state,$cookieStore, accountService,baseInfoService) {
    baseInfoService.getDelivery().then(function(response){
        if(response.code == 0){
            if(response.data.deliveryType != 0 && response.data.deliveryType != 1){
                $scope.showPerfect = 1;
            }
        }
    });

    accountService.overview().then(function(response){
        console.log(response);
        if(response.code == 0){
            $scope.info = response.data;
        }
    });



    $scope.closePerfect= function(){
        $scope.showPerfect = null;
    }

}])
;